@use "../../variables.scss";

.installed-watch-wrapper {
  width: 100%;

  .installed-watch {
    border-radius: 4px;
    border: solid 1px variables.$border-color;
  }

  .installed-watch .installed-watch-header {
    padding: 16px 23px;
    background: #fafafa;
    border-bottom: 1px solid variables.$border-color;
    align-items: center;
    .installed-watch-name {
      margin-right: 50px;
      .logo {
        width: 44px;
        height: 44px;
        border-radius: 50px;
        margin-right: 12px;
        background-color: #fff;
        box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.16);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
      }
    }
    .installed-watch-integrations {
      .border {
        padding: 0 15px;
      }
      .icon {
        margin-right: 10px;
      }
    }
    .installed-watch-actions {
      margin-left: auto;
    }
  }

  &.pending .installed-watch {
    border-style: dashed;

    .installed-watch-header {
      background-color: #fcfcfc;
      border-bottom: 1px dashed variables.$border-color;

      .installed-watch-name {
        opacity: 0.5;
      }
    }
  }

  .installed-watch .installed-watch-body {
    .installed-watch-sidebar {
      margin: 20px;
      max-width: 265px;
      border-left: solid 1px variables.$border-color;
      padding-left: 20px;
      .assets .download-wrapper {
        padding: 14px 12px 0;
        border: solid variables.$border-color 1px;
        border-radius: 4px;
      }
    }
  }
  .installed-watch .watch-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
    display: block;
  }
  .button-wrapper {
    padding: 4px 0;
    margin-top: 0;
    border-top: 1px solid variables.$border-color;

    .card-action-wrapper {
      position: relative;
      padding: 4px;

      &:after {
        position: absolute;
        content: "";
        right: 0;
        top: 6px;
        height: 16px;
        width: 1px;
        background-color: variables.$border-color;
      }
      &:last-child:after {
        display: none;
      }
    }
    .card-action {
      padding: 8px 6px;
      border-radius: 4px;
      transition: background-color 0.3s;

      &:hover {
        background-color: variables.$primary-light-color;
      }
      &.deployment:hover {
        background-color: #ecf8ef;
      }
    }
  }
}

.installed-watch-github {
  overflow: hidden;
  &.padded {
    padding: 20px 0 20px 20px;
  }
  .integration {
    max-width: 310px;
    min-width: 310px;
    border: solid 1px variables.$border-color;
    border-radius: 4px;
    padding: 12px 12px 0px 12px;
    margin-right: 20px;
    .disabled {
      opacity: 0.5;
      pointer-events: none;
    }
    .path {
      word-break: break-all;
      line-height: 1;
    }
    .cluster-actions-wrapper {
      margin-top: 4px;
      & > span {
        position: relative;
        padding-right: 6px;
        margin-right: 6px;
        &:after {
          position: absolute;
          content: "";
          right: 0;
          top: 1px;
          height: 14px;
          width: 1px;
          background-color: variables.$border-color;
        }
        &:last-child {
          padding-right: 0;
          margin-right: 0;
          &:after {
            display: none;
          }
        }
      }
    }
    .card-action-wrapper {
      position: relative;
      padding: 4px;

      &:after {
        position: absolute;
        content: "";
        right: 0;
        top: 6px;
        height: 16px;
        width: 1px;
        background-color: variables.$border-color;
      }
      &:last-child:after {
        display: none;
      }
    }
    .card-action {
      padding: 8px 6px;
      border-radius: 4px;
      transition: background-color 0.3s;

      &:hover {
        background-color: variables.$primary-light-color;
      }
      &.deployment:hover {
        background-color: #ecf8ef;
      }
    }
  }
}

.add-new-integration {
  background-image: url("../../../images/add-new-github-int-border.svg");
  background-repeat: no-repeat;
  background-size: auto 100%;
  min-width: 83px;
  min-height: 204px;
}

.deployment-or-text {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2;
  color: #9b9b9b;
  margin: 0 10px 0 8px;
}

.PendingInstall--wrapper {
  padding: 15px;
  min-height: 180px;

  .pending-text-wrapper {
    margin: 0 auto;
    max-width: 450px;
    width: 100%;
  }
}

.EmptyState--wrapper {
  padding: 15px;
  border-radius: 4px;
  border: 2px dashed variables.$border-color;

  .EmptyState {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .completed-steps-wrapper {
    width: 100%;
    max-width: 570px;

    .completed-step {
      position: relative;

      &:last-child {
        margin-left: -30px;
      }
      &:last-child::after {
        display: none;
      }
    }

    .completed-step::after {
      content: "";
      position: absolute;
      display: block;
      width: 80px;
      height: 2px;
      border-top: 2px solid variables.$border-color;
      right: -40px;
      top: 76px;
      margin-top: -10px;
    }

    .completed-step:nth-child(2)::after {
      border-top: 2px dashed variables.$border-color;
    }

    .completed-step p {
      font-size: 12px;
      font-weight: 500;
      padding: 0 10px;
      line-height: 18px;
      word-break: break-word;

      &.command {
        font-size: 14px;
        font-weight: 600;
      }
    }
    .checkmark-icon {
      vertical-align: -2px;
    }
    .image-wrapper {
      margin: 8px 0 10px;
      height: 76px;

      &.init {
        background-position: 0 -289px;
        width: 100px;
      }
      &.watch {
        background-position: 0 -367px;
        width: 92px;
      }
      &.update {
        background-position: 0 -447px;
        width: 85px;
      }
    }
  }
}

/* ≥ 768px */
@media screen and (min-width: 48em) {
}

/* ≥ 960px */
@media screen and (min-width: 60em) {
}

/* ≥ 1280px */
@media screen and (min-width: 80em) {
}
